#transitionDiv {
    height: 30px;
    width: 100px;
    line-height: 30px;
    border-radius: 5px;
    color: #000;
    background-color: silver;
    transition: all 1s linear;
}

#transitionDiv:hover{
    color: white;
    background-color: #45b823;
}
@keyframes mycolor{
    0%{
        background-color: silver;
    }
    30%{
        background-color: #45b823;
    }
    60%{
        background-color: orange;
    }
    100%{
        background-color: silver;
    }
}

#animationDiv:hover{
    animation: mycolor 5s linear;

}